/*
 * main.cpp
 *
 *  Created on: 03-11-2010
 *      Author: Piotr
 */

#include "Window.hpp"
#include "InitVideoException.hpp"
#include <iostream>
#include <cstdlib>
using namespace std;

#ifdef main
#undef main
#endif
int main(int, char *[])
{
	try
	{
		Window window;
		window.init();
		window.run();
	}
	catch(InitVideoException& initVideoException)
	{
		cout << "Application init failed:\n";
		cout << initVideoException.what();
		return EXIT_FAILURE;
	}
	catch(exception& e)
	{
		cout << "Exception occured:\n";
		cout << e.what();
		return EXIT_FAILURE;
	}

	return EXIT_SUCCESS;
}
